package cn.kgc.watch.service.impl;

import cn.kgc.watch.entity.Category;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import cn.kgc.watch.mapper.CategoryMapper;
import cn.kgc.watch.service.CategoryService;

import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService{

    @Resource
    private CategoryMapper categoryMapper;

    @Override
    public List<Category> findAll() {
        return categoryMapper.selectAll();
    }

    @Override
    public Category findById(Integer id) {
        return categoryMapper.selectById(id);
    }
}
